//---------------------------------------------------------------------------
#ifndef ArticleH
#define ArticleH
//---------------------------------------------------------------------------
#include <vcl.h>

class Article
{
	private:
	int articleID;			// the id of this article
	AnsiString name;		// the name of this article
	int nrOfItems;			// the number of items of this article
	AnsiString kind;  		// the kind of this article, for instance "christmas-article"
	double price;       	// the price an item of this article
	double deposit;			// the desposit for a article

	AnsiString padRight(AnsiString str, int len);
	/*
	this function will add spaces to the left side of the string.
	*/

	public:
	//constructors
	
	/*
	constructs an Article-object with id 0, name "noname", items 0,
	kind "unknown" and price 0.0.
	*/
	Article();

	/*
	constructs an Article-object with id, name, nrOfItems, kind and
	price as specified with the parameters of this constructor.
	*/
	Article(int id, AnsiString name, int nrOfItems, AnsiString kind, double price, double deposit);


	//methods (functions)

	/*
	initializes an Article-object with id, name, nrOfItems, kind and
	price and deposit as specified with the parameters of this method.
	*/
	void initialize(int id, AnsiString name, int nrOfItems, AnsiString kind, double price, double deposit);

	/*
	some get-functions
	*/
	int getArticleID();
	AnsiString getName();
	int getNrOfItems();
	AnsiString getKind();
	double getPrice();
	double getDeposit();

	/*
	returns an AnsiString with information about the
	datamembers of this object,
	separated bij delimiters (choose your own delimiters).
	*/
	AnsiString asAString();

	/*
	decreases the number of items of this object by amount.
	*/
	void decreaseNrOfItemsBy(int amount);

	/*
	increases the number of items of this object by amount.
	*/
	void increaseNrOfItemsBy(int amount);
};
//---------------------------------------------------------------------------
#endif
